package st.business.tepth.business.maintainplan;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;

import java.util.List;

/**
 * @author zhangyu
 * @date 2019/6/4
 */
public class MaintainPlanPagerAdapter extends FragmentStatePagerAdapter {
    private List<String> mList;

    public MaintainPlanPagerAdapter(FragmentManager fm) {
        super(fm);
    }

    public MaintainPlanPagerAdapter(FragmentManager fm, List<String> list) {
        this(fm);
        mList = list;
    }

    @Override
    public Fragment getItem(int i) {
        return MaintainPlanDayDelegate.newInstance(mList.get(i));
    }

    @Override
    public int getCount() {
        return mList.size();
    }
}
